import {baseRequest} from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/tjzy/case/` + url, ...arg)
export default {
	casePage(data) {
		return request('pageList', data, 'post')
	},
	caseDetailPage(data) {
		return request('pageListDetail', data, 'post')
	},
	getCaseDetailJson(id) {
		return request('getCaseDetailJson/' + id, '', 'get')
	},
	importCase(data, projectCode) {
		return request('importCase?projectCode=' + projectCode, data)
	},
	getNextCaseId(data) {
		return request('changeCase', data, 'post')
	},
	updateCase(data) {
		return request('edit', data, 'post')
	},
	exportMyCaseLiaison(data) {
		return request('exportMyCaseLiaison', data, 'post', {
			responseType: 'blob'
		})
	},
	getWordMediationData(caseId) {
		return request('getWordMediationData/' + caseId, null, 'get')
	}
}
